# name : compare dt using merge
# key : dt_comp_merge
# contributor: Shuguang Sun
# --
data ${3:dout};
  merge ${1:din1} (in=a ${4:keep = ${5:usubjid}})
    ${2:din2} (in = b $4 rename = (${6:old} = ${7:new}));
  by ${8:usubjid};
  if a and not b then ind = 1;
  else if not a and b then ind = 2;
  else if $6 ne $7 then ind = 3;
  output;
run;
